>>77911376>>77911535The full description of that part goes like this, but I somehow managed to jump over it because I'm tired AF:
"If CREATE_ALWAYS and FILE_ATTRIBUTE_NORMAL are specified, CreateFile fails and sets the last error to ERROR_ACCESS_DENIED if the file exists and has the FILE_ATTRIBUTE_HIDDEN or FILE_ATTRIBUTE_SYSTEM attribute. To avoid the error, specify the same attributes as the existing file."
It's essentially only happens if there is an attribute conflict and only with hidden and the system attribute being set.
CREATE_ALWAYS otherwise means that the file will be overwritten:
"Creates a new file, always.
If the specified file exists and is writable, the function overwrites the file, the function succeeds, and last-error code is set to ERROR_ALREADY_EXISTS (183).
If the specified file does not exist and is a valid path, a new file is created, the function succeeds, and the last-error code is set to zero."
FILE_ATTRIBUTE_NORMAL simply means that it's a normal fucking file. Still the point stands that CreateFile isn't only used for creating a file. Opening for READ and WRITE is also pretty standard.